home *** CD-ROM | disk | FTP | other *** search
/ AGA Toolkit '97 / The AGA Toolkit '97.iso / programming / c / make-3.75 / makefile.in < prev    next >
Encoding:
Makefile  |  1996-09-07  |  10.5 KB  |  308 lines

  1. # NOTE: If you have no `make' program at all to process this makefile, run
  2. # `build.sh' instead.
  3. #
  4. # Copyright (C) 1988, 89, 91, 92, 93, 94, 1995 Free Software Foundation, Inc.
  5. # This file is part of GNU Make.
  6. # GNU Make is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation; either version 2, or (at your option)
  9. # any later version.
  10. #
  11. # GNU Make is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. # GNU General Public License for more details.
  15. # You should have received a copy of the GNU General Public License
  16. # along with GNU Make; see the file COPYING.  If not, write to
  17. # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  18.  
  19. #
  20. #    Makefile for GNU Make
  21. #
  22.  
  23. # Ultrix 2.2 make doesn't expand the value of VPATH.
  24. VPATH = @srcdir@
  25. # This must repeat the value, because configure will remove `VPATH = .'.
  26. srcdir = @srcdir@
  27.  
  28. CC = @CC@
  29.  
  30. CFLAGS = @CFLAGS@
  31. CPPFLAGS = @CPPFLAGS@
  32. LDFLAGS = @LDFLAGS@
  33.  
  34. # Define these for your system as follows:
  35. #    -DNO_ARCHIVES        To disable `ar' archive support.
  36. #    -DNO_FLOAT        To avoid using floating-point numbers.
  37. #    -DENUM_BITFIELDS    If the compiler isn't GCC but groks enum foo:2.
  38. #                Some compilers apparently accept this
  39. #                without complaint but produce losing code,
  40. #                so beware.
  41. # NeXT 1.0a uses an old version of GCC, which required -D__inline=inline.
  42. # See also `config.h'.
  43. defines = @DEFS@ -DLIBDIR=\"$(libdir)\" -DINCLUDEDIR=\"$(includedir)\"
  44.  
  45. # Which flavor of remote job execution support to use.
  46. # The code is found in `remote-$(REMOTE).c'.
  47. REMOTE = @REMOTE@
  48.  
  49. # If you are using the GNU C library, or have the GNU getopt functions in
  50. # your C library, you can comment these out.
  51. GETOPT = getopt.o getopt1.o
  52. GETOPT_SRC = $(srcdir)/getopt.c $(srcdir)/getopt1.c $(srcdir)/getopt.h
  53.  
  54. # If you are using the GNU C library, or have the GNU glob functions in
  55. # your C library, you can comment this out.  GNU make uses special hooks
  56. # into the glob functions to be more efficient (by using make's directory
  57. # cache for globbing), so you must use the GNU functions even if your
  58. # system's C library has the 1003.2 glob functions already.  Also, the glob
  59. # functions in the AIX and HPUX C libraries are said to be buggy.
  60. GLOB = glob/libglob.a
  61.  
  62. # If your system doesn't have alloca, or the one provided is bad, define this.
  63. ALLOCA = @ALLOCA@
  64. ALLOCA_SRC = $(srcdir)/alloca.c
  65.  
  66. # If your system needs extra libraries loaded in, define them here.
  67. # System V probably need -lPW for alloca.  HP-UX 7.0's alloca in
  68. # libPW.a is broken on HP9000s300 and HP9000s400 machines.  Use
  69. # alloca.c instead on those machines.
  70. LOADLIBES = @LIBS@
  71.  
  72. # Any extra object files your system needs.
  73. extras = @LIBOBJS@
  74.  
  75. # Common prefix for machine-independent installed files.
  76. prefix = @prefix@
  77. # Common prefix for machine-dependent installed files.
  78. exec_prefix = @exec_prefix@
  79.  
  80. # Directory to install `make' in.
  81. bindir = $(exec_prefix)/bin
  82. # Directory to find libraries in for `-lXXX'.
  83. libdir = $(exec_prefix)/lib
  84. # Directory to search by default for included makefiles.
  85. includedir = $(prefix)/include
  86. # Directory to install the Info files in.
  87. infodir = $(prefix)/info
  88. # Directory to install the man page in.
  89. mandir = $(prefix)/man/man$(manext)
  90. # Number to put on the man page filename.
  91. manext = 1
  92. # Prefix to put on installed `make' binary file name.
  93. binprefix =
  94. # Prefix to put on installed `make' man page file name.
  95. manprefix = $(binprefix)
  96.  
  97. # Whether or not make needs to be installed setgid.
  98. # The value should be either `true' or `false'.
  99. # On many systems, the getloadavg function (used to implement the `-l'
  100. # switch) will not work unless make is installed setgid kmem.
  101. install_setgid = @NEED_SETGID@
  102. # Install make setgid to this group so it can read /dev/kmem.
  103. group = @KMEM_GROUP@
  104.  
  105. # Program to install `make'.
  106. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  107. # Program to install the man page.
  108. INSTALL_DATA = @INSTALL_DATA@
  109. # Generic install program.
  110. INSTALL = @INSTALL@
  111.  
  112. # Program to format Texinfo source into Info files.
  113. MAKEINFO = makeinfo
  114. # Program to format Texinfo source into DVI files.
  115. TEXI2DVI = texi2dvi
  116.  
  117. # Programs to make tags files.
  118. ETAGS = etags -w
  119. CTAGS = ctags -w
  120.  
  121. objs = commands.o job.o dir.o file.o misc.o main.o read.o remake.o    \
  122.        rule.o implicit.o default.o variable.o expand.o function.o    \
  123.        vpath.o version.o ar.o arscan.o signame.o remote-$(REMOTE).o    \
  124.        $(GLOB) $(GETOPT) $(ALLOCA) $(extras)
  125. srcs = $(srcdir)/commands.c $(srcdir)/job.c $(srcdir)/dir.c        \
  126.        $(srcdir)/file.c $(srcdir)/getloadavg.c $(srcdir)/misc.c        \
  127.        $(srcdir)/main.c $(srcdir)/read.c $(srcdir)/remake.c        \
  128.        $(srcdir)/rule.c $(srcdir)/implicit.c $(srcdir)/default.c    \
  129.        $(srcdir)/variable.c $(srcdir)/expand.c $(srcdir)/function.c    \
  130.        $(srcdir)/vpath.c $(srcdir)/version.c                \
  131.        $(srcdir)/remote-$(REMOTE).c                    \
  132.        $(srcdir)/ar.c $(srcdir)/arscan.c                \
  133.        $(srcdir)/signame.c $(srcdir)/signame.h $(GETOPT_SRC)        \
  134.        $(srcdir)/commands.h $(srcdir)/dep.h $(srcdir)/file.h        \
  135.        $(srcdir)/job.h $(srcdir)/make.h $(srcdir)/rule.h        \
  136.        $(srcdir)/variable.h $(ALLOCA_SRC) $(srcdir)/config.h.in
  137.  
  138.  
  139. .SUFFIXES:
  140. .SUFFIXES: .o .c .h .ps .dvi .info .texinfo
  141.  
  142. all: make
  143. info: make.info
  144. dvi: make.dvi
  145. # Some makes apparently use .PHONY as the default goal if it is before `all'.
  146. .PHONY: all check info dvi
  147.  
  148. make.info: make.texinfo
  149.     $(MAKEINFO) -I$(srcdir) $(srcdir)/make.texinfo -o make.info
  150.  
  151. make.dvi: make.texinfo
  152.     $(TEXI2DVI) $(srcdir)/make.texinfo
  153.  
  154. make.ps: make.dvi
  155.     dvi2ps make.dvi > make.ps
  156.  
  157. make: $(objs)
  158.     $(CC) $(LDFLAGS) $(objs) $(LOADLIBES) -o make.new
  159.     mv -f make.new make
  160.  
  161. # -I. is needed to find config.h in the build directory.
  162. .c.o:
  163.     $(CC) $(defines) -c -I. -I$(srcdir) -I$(srcdir)/glob \
  164.           $(CPPFLAGS) $(CFLAGS) $< $(OUTPUT_OPTION)
  165.  
  166. # For some losing Unix makes.
  167. SHELL = /bin/sh
  168. @SET_MAKE@
  169.  
  170. glob/libglob.a: FORCE config.h
  171.     cd glob; $(MAKE) libglob.a
  172. FORCE:
  173.  
  174. tagsrcs = $(srcs) $(srcdir)/remote-*.c
  175. TAGS: $(tagsrcs)
  176.     $(ETAGS) $(tagsrcs)
  177. tags: $(tagsrcs)
  178.     $(CTAGS) $(tagsrcs)
  179.  
  180. .PHONY: install installdirs
  181. install: installdirs \
  182.      $(bindir)/$(binprefix)make $(infodir)/make.info \
  183.      $(mandir)/$(manprefix)make.$(manext)
  184.  
  185. installdirs:
  186.     $(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(infodir) $(mandir)
  187.  
  188. $(bindir)/$(binprefix)make: make
  189.     $(INSTALL_PROGRAM) make $@.new
  190.     @if $(install_setgid); then \
  191.        if chgrp $(group) $@.new && chmod g+s $@.new; then \
  192.          echo "chgrp $(group) $@.new && chmod g+s $@.new"; \
  193.        else \
  194.          echo "$@ needs to be owned by group $(group) and setgid;"; \
  195.          echo "otherwise the \`-l' option will probably not work."; \
  196.          echo "You may need special privileges to install $@."; \
  197.        fi; \
  198.      else true; fi
  199. # Some systems can't deal with renaming onto a running binary.
  200.     -rm -f $@.old
  201.     -mv $@ $@.old
  202.     mv $@.new $@
  203.  
  204. $(infodir)/make.info: make.info
  205.     if [ -r ./make.info ]; then dir=.; else dir=$(srcdir); fi; \
  206.     for file in $${dir}/make.info*; do \
  207.       name="`basename $$file`"; \
  208.       $(INSTALL_DATA) $$file \
  209.         `echo $@ | sed "s,make.info\$$,$$name,"`; \
  210.     done
  211. # Run install-info only if it exists.
  212. # Use `if' instead of just prepending `-' to the
  213. # line so we notice real errors from install-info.
  214. # We use `$(SHELL) -c' because some shells do not
  215. # fail gracefully when there is an unknown command.
  216.     if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
  217.       if [ -r ./make.info ]; then dir=.; else dir=$(srcdir); fi; \
  218.       install-info --infodir=$(infodir) $$dir/make.info; \
  219.     else true; fi
  220.  
  221. $(mandir)/$(manprefix)make.$(manext): make.man
  222.     $(INSTALL_DATA) $(srcdir)/make.man $@
  223.  
  224.  
  225. loadavg: loadavg.c config.h
  226.     $(CC) $(defines) -DTEST -I. -I$(srcdir) $(CFLAGS) $(LDFLAGS) \
  227.           loadavg.c $(LOADLIBES) -o $@
  228. # We copy getloadavg.c into a different file rather than compiling it
  229. # directly because some compilers clobber getloadavg.o in the process.
  230. loadavg.c: getloadavg.c
  231.     ln $(srcdir)/getloadavg.c loadavg.c || \
  232.     cp $(srcdir)/getloadavg.c loadavg.c
  233. check-loadavg: loadavg
  234.     @echo The system uptime program believes the load average to be:
  235.     -uptime
  236.     @echo The GNU load average checking code believes:
  237.     ./loadavg
  238. check: check-loadavg
  239.  
  240.  
  241. .PHONY: clean realclean distclean mostlyclean
  242. clean: glob-clean
  243.     -rm -f make loadavg *.o core make.dvi
  244. distclean: clean glob-realclean
  245.     -rm -f Makefile config.h config.status build.sh stamp-config
  246.     -rm -f config.log config.cache
  247.     -rm -f TAGS tags
  248.     -rm -f make.?? make.??s make.log make.toc make.*aux
  249.     -rm -f loadavg.c
  250. realclean: distclean
  251.     -rm -f make.info*
  252. mostlyclean: clean
  253.  
  254. .PHONY: glob-clean glob-realclean
  255. glob-clean glob-realclean:
  256.     cd glob; $(MAKE) $@
  257.  
  258. Makefile: config.status $(srcdir)/Makefile.in
  259.     $(SHELL) config.status
  260. glob/Makefile: config.status $(srcdir)/glob/Makefile.in
  261.     $(SHELL) config.status
  262. config.h: stamp-config ;
  263. stamp-config: config.status $(srcdir)/config.h.in
  264.     $(SHELL) config.status
  265.     touch stamp-config
  266.  
  267. #configure: configure.in aclocal.m4
  268. #    cd $(srcdir) && autoconf $(ACFLAGS)
  269. #config.h.in: configure.in aclocal.m4
  270. #    cd $(srcdir) && autoheader $(ACFLAGS)
  271.  
  272. # This tells versions [3.59,3.63) of GNU make not to export all variables.
  273. .NOEXPORT:
  274.  
  275. # The automatically generated dependencies below may omit config.h
  276. # because it is included with ``#include <config.h>'' rather than
  277. # ``#include "config.h"''.  So we add the explicit dependency to make sure.
  278. $(objs): config.h
  279.  
  280. # Automatically generated dependencies will be put at the end of the file.
  281.  
  282. # Automatically generated dependencies.
  283. commands.o : commands.c make.h dep.h commands.h file.h variable.h job.h 
  284. job.o: job.c make.h commands.h job.h file.h variable.h
  285. dir.o: dir.c make.h
  286. file.o: file.c make.h commands.h dep.h file.h variable.h
  287. misc.o: misc.c make.h dep.h
  288. main.o: main.c make.h commands.h dep.h file.h variable.h job.h getopt.h
  289. read.o: read.c make.h commands.h dep.h file.h variable.h glob/glob.h
  290. remake.o: remake.c make.h commands.h job.h dep.h file.h
  291. rule.o : rule.c make.h config.h commands.h dep.h file.h variable.h rule.h 
  292. implicit.o : implicit.c make.h rule.h dep.h file.h 
  293. default.o: default.c make.h rule.h dep.h file.h commands.h variable.h
  294. variable.o : variable.c make.h commands.h variable.h dep.h file.h 
  295. expand.o: expand.c make.h commands.h file.h variable.h
  296. function.o: function.c make.h variable.h dep.h commands.h job.h
  297. vpath.o : vpath.c make.h file.h variable.h 
  298. version.o: version.c
  299. ar.o : ar.c make.h file.h dep.h 
  300. arscan.o: arscan.c make.h
  301. signame.o: signame.c signame.h
  302. remote-stub.o : remote-stub.c make.h commands.h 
  303. getopt.o: getopt.c getopt.h
  304. getopt1.o : getopt1.c getopt.h 
  305. getloadavg.o: getloadavg.c
  306.